Dynamic Error Remediation: A Case Study with Null Pointer Exceptions
نویسندگان
چکیده
Managed programming languages have improved the robustness of software by reducing some classes of errors. Despite these improvements, programs still contain errors. Even with help from existing static and dynamic analysis tools, the errors are often difficult to detect and can be even more difficult to successfully eliminate. This work introduces a new approach, called dynamic error remediation, that further improves the robustness of software, by tolerating some null pointer exceptions until a patch can be created to fix the exception. This paper describes dynamic error remediation, and its effectiveness, with different strategies for handling the exceptions. We show that dynamic error remediation is successful in allowing programs to continue execution and to do meaningful work in many cases. We then describe the bug suite created to test dynamic error remediation, as well as providing a methodology for creating other bug suites. Finally, we describe origin tracking, a JVM modification which exposes the origin of null values that cause null pointer exceptions. Because dynamic error remediation is successful in many cases, we assert that it is a viable strategy for increasing availability and reliability in many programs. While increasing availability over correctness is not ideal in all cases, we show that there are real examples where it is preferred, and we provide dynamic error remediation as a tool for developers and users to survive null pointer exception bugs.
منابع مشابه
Automatic Analysis and Repair of Exception Bugs for Java Programs. (Analyse et réparation automatique des bugs liés aux exceptions dans les programmes Java)
The world is day by day more computerized. There is more and more software running everywhere, from personal computers to data servers, and inside most of the new popularized inventions such as connected watches or intelligent washing machines. All of those technologies use software applications to perform the services they are designed for. Unfortunately, the number of software errors grows wi...
متن کاملNPEFix: Automatic Runtime Repair of Null Pointer Exceptions in Java
Null pointer exceptions, also known as null dereferences are the number one exceptions in the field. In this paper, we propose 9 alternative execution semantics when a null pointer exception is about to happen. We implement those alternative execution strategies using code transformation in a tool called NPEfix. We evaluate our prototype implementation on 11 field null dereference bugs and 519 ...
متن کاملComplexity of Points-To Analysis of Java in the Presence of Exceptions
At each program point, points-to analysis for statically typed object-oriented programming languages (e.g., Java, C) determines those objects to which a reference may refer (or a pointer may point) during execution. Points-to analysis is necessary for any semantics-based software tools for object-oriented systems. Our new complexity results for points-to analysis distinguish the difficulty of i...
متن کاملAbstract Regular Tree Model Checking of Complex Dynamic Data Structures
Regular Tree Model Checking of Complex Dynamic Data Structures Ahmed Bouajjani1, Peter Habermehl1, Adam Rogalewicz2, and Tomáš Vojnar2 1 LIAFA, University of Paris 7, Case 7014, 2 place Jussieu, F-75251 Paris 5, France. e-mail: {Ahmed.Bouajjani,Peter.Habermehl}@liafa.jussieu.fr 2 FIT, Brno University of Technology, Božetěchova 2, CZ-61266, Brno, Czech Republic. e-mail: {rogalew,vojnar}@fit.vutb...
متن کاملExploiting exceptions
Most programmers use exceptions to handle exceptional events. However, exceptions can also be used to simplify the control logic of a program and enhance readability [1]. As we will demonstrate, there are situations where exceptions can be used as a standard programming pattern to make programs execute faster. These situations are opportunities to increase the speed of Java programs by changing...
متن کامل